﻿/********************************************************************************************
 * 文件名称:	MenuInfo.cs
 * 设计人员:	严(yanxianghui@gmail.com)
 * 设计时间:	2009-03-16
 * 功能描述:	栏目结构
 * 注意事项:	
 * 版权所有:	Copyright (c) 2009, Fujian SIRC
 * 修改记录: 	修改时间		人员		修改备注
 *				    ----------		------		-------------------------------------------------
 *
 ********************************************************************************************/
using System;
using System.Collections.Generic;
using System.Text;
using Shanfree.Framework.Utility;

namespace Shanfree.SharpMovie.Model
{
    /// <summary>
    /// 栏目结构
    /// </summary>
    [Persistence(IsPrimaryKey = false, ColumnName = "Menu")]
    public class MenuInfo : ITreeNode
    {
        /// <summary>
        /// 默认的根结点ID
        /// </summary>
        public const string DEFAULT_PARENT_ID = "-1";
        /// <summary>
        /// 栏目ID
        /// </summary>
        [Persistence(IsPrimaryKey = true, ColumnName = "ID")]
        public string ID { get; set; }
        /// <summary>
        /// 栏目名称
        /// </summary>
        [Persistence(IsPrimaryKey = false, ColumnName = "Name")]
        public string Name { get; set; }
        /// <summary>
        /// 栏目父级ID,默认为-1
        /// </summary>
        [Persistence(IsPrimaryKey = false, ColumnName = "ParentID")]
        public string ParentID { get; set; }
        /// <summary>
        /// 排序号
        /// </summary>
        [Persistence(IsPrimaryKey = false, ColumnName = "SortNum")]
        public int SortNum { get; set; }
        /// <summary>
        /// 是否显示于主页导航条
        /// </summary>
        [Persistence(IsPrimaryKey = false, ColumnName = "IsShow")]
        public bool IsShow { get; set; }
        /// <summary>
        /// 栏目默认显示页的连接
        /// </summary>
        [Persistence(IsPrimaryKey = false, ColumnName = "Url")]
        public string Url { get; set; }
        /// <summary>
        /// 栏目是否为外部链接
        /// </summary>
        [Persistence(IsPrimaryKey = false, ColumnName = "IsExtendUrl")]
        public bool IsExtendUrl { get; set; }
        /// <summary>
        /// 图片的外部链接
        /// </summary>
        [Persistence(IsPrimaryKey = false, ColumnName = "Image")]
        public string Image { get; set; }
        /// <summary>
        /// 栏目内容是否需要自定义
        /// </summary>
        public bool IsCustomer { get; set; }
        /// <summary>
        /// 默认构造函数
        /// </summary>
        public MenuInfo()
        {
        }
        /// <summary>
        /// 指定主键
        /// </summary>
        /// <param name="id"></param>
        public MenuInfo(string id)
        {
            this.ID = id;
        }
    }
}
